import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import Components from "unplugin-vue-components/vite";
import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";

export default defineConfig({
  resolve: {
    alias: {
      "@": "/src",
    },
  },
  plugins: [
    vue(),
    /* antd按需加载 */
    Components({
      // 默认注册src/components目录下的组件
      resolvers: [AntDesignVueResolver()],
      dts: true,
    }),
  ],
});
